home *** CD-ROM | disk | FTP | other *** search
-
- Electric Corrections Help
-
-
- help version: 0.3.2
- created: 10/05/00 {08:43:42 pm}
- last update: 11/29/00 {10:40:28 am}
-
-
- This extension package for Alpha helps check for and correct spelling
- mistakes or typos as you type. This is not a spell-checking extension --
- instead it is more of a "misspell-checker": you must teach Alpha the common
- misspellings or typos to correct using the menu items described below.
-
- Whenever you press the return or space key, Alpha will then compare the
- previous word to the list of all typos, and correct it if necessary. This
- package also includes a "Smart i" preference, which can automatically
- change "i" to "I" as you type.
-
- Activating the extension will create four new preferences and insert a new
- "Config --> Packages --> Electric Corrections" submenu described below.
-
-
- Preferences
-
-
- These preferences appear in the "Config --> Preferences --> Electrics"
- menu. They can also be changed via the "Electric Corrections" menu.
-
- Smart i
-
- Automatically convert " i " to " I ".
-
- Smart i Modes
-
- Allows you to specify the modes that use the "Smart i" feature, initially
- including only "Text TeX Bib HTML". If this list is empty, automatic
- correction applies to all modes.
-
- Turn Corrections On/Off
-
- Turns automatic corrections of typos on or off. This does not affect the
- "Smart i" preference.
-
- Correcting Modes
-
- Allows you to specify the modes that check for misspellings. If this list
- is empty (the default value), automatic correction applies to all modes.
-
-
- Electric Corrections Menu
-
-
- View Corrections
-
- Open a window with all current typos. The package only supplies one typo
- to initially correct, changing "hte" to "the"
-
- Add Corrections
-
- Open a dialog to create new typos. Only lower-case typos need to be
- entered -- both lower-case and capitalized typos will be corrected
- automatically.
-
- Edit Corrections
-
- Open a list-pick dialog to edit all typos.
-
- Remove Corrections
-
- Open a list-pick dialog to remove all user-defined typos.
-
- Smart i
-
- Automatically convert " i " to " I ".
-
- (This is a toggleable menu item, turning the preference on and off.)
-
- Smart i Modes
-
- Allows you to specify the modes that use the "Smart i" preference,
- initially including only "Text TeX Bib HTML". If this list is empty,
- automatic correction applies to all modes.
-
- Turn Corrections On/Off
-
- Turns automatic corrections of misspellings or typos on or off. This does
- not affect the "Smart i" preference.
-
- Correcting Modes
-
- Allows you to specify the modes that check for typos. If this list is
- empty (the default value), automatic correction applies to all modes.
-
- Corrections Help
-
- Open this file.
-
-
- Usage
-
-
- Following every <space> or <return> keystroke, the preceding word is
- checked against the list of defined typos -- if the word matches, it is
- deleted and the correction is inserted. If the "Smart i" preference is
- set, then any lone i will be converted to I. Preceding words are checked
- even if followed by an intermediate character such as , . ; etc. -- the
- correction is inserted without disturbing the following characters. So
-
- Where was i?
- i decided to ask hte, well, obviously oblivious inn-keeper, ...
-
- corrects to
-
- Where was I?
- I decided to ask the, well, obviously oblivious inn-keeper, ...
-
- All user-defined misspellings/typos are automatically converted to both
- lower case and capitalized words -- both "hte --> the" and "Hte --> The"
- work, but only the first must be defined. Note that if you have multiple
- misspellings for the same word, you must defined each one separately, such
- as "teh --> the". All typos will be corrected in any mode listed in the
- "Correcting Modes" preference -- it is not possible (at least not yet ...)
- to define mode-specific typos.
-
-
- Here's one way to exploit this feature: I have defined the following
- "typos", which I generally will not accidentally type:
-
- "sgy --> sociology"
- "scal --> sociological"
- "slly --> sociologically"
- "sc --> social capital"
-
- Now whenever I type "sgy" or "Sgy", the "correction" is automatically
- inserted if I follow it with a <space> or <return>. Suppose that I have
- the terms "screaming" and "somethingCruddy" in my file, and I have just
- typed "sc". Note the following electric options:
-
- <space> or <return>: correct to "social capital"
- <completion key>: complete to "screaming"
- <expansion key>: expand to "somethingCruddy"
-
-
- If you would like to define "electric corrections over-ride" keys, open a
- "prefs.tcl" file and add these lines:
-
- Bind '\ ' <s> {insertText "\ "}
- Bind '\r' <s> {bind::CarriageReturn}
-
- Holding down the shift key while pressing <space> or <return> will then
- over-ride corrections and simply enter a space or a carriage return.
-
-
- Possible future directions
-
-
- • Include a pre-defined set of typos that has something more than simply
- "hte". I would just as soon leave it up to the user to create them,
- but if somebody has a list that they would like to send along (with
- common typos and the corrections, please) I'll include it in future
- versions. One concern that I have is that for such a list to be truly
- useful, it should be comprehensive, and that will both make it much
- more difficult for the user to know what's in there and potentially
- slow down the correcting process.
-
- Procedures have already been written to unset/restore the default
- list. It would be possible to come up with several different lists to
- accommodate different editing settings, or languages ...
-
- • Allow the creation of mode-specific corrections, similarly to
- mode-specific completions. I don't have any objections, but I'm not
- sure about the best way to accomplish this.
-
- Source code can be found in "elecCorrections.tcl" -- contributions are
- certainly welcome.
-
-
- Acknowledgments
-
-
- This package was inspired by "Electric Completions / Expansions", and based
- upon the proc: sql_electUpper found in "sqlMode.tcl" (Joel D. Elkins.)
- Many thanks to Vince Darley and Bernard Desgraupes for several bug fixes
- and suggestions.
-
-
- License and Disclaimer
-
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; if not, write to the Free Foundation, Inc., 59
- Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- This mode is free. Alpha is shareware ! {{register}}
-
-
- cheers,
-
- -- Craig
-
-
- Author: Craig Barton Upright
- E-mail: <cupright@princeton.edu>
- mail: Princeton University, Department of Sociology
- Princeton, New Jersey 08544
- www: <http://www.princeton.edu/~cupright/>
-
-